<?php
	include_once("connect.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Free Hotel Website Template - designed by TemplateMonster</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="description" content="This is a wonderful homepage of the Free Hotel Website Template provided by TemplateMonster."/>
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="layout.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function formValidator(){
	// Make quick references to our fields
	var cekin= document.getElementById('cekin');
	var cekout= document.getElementById('cekout');
	
	// Check each input in the order that it appears in the form!
	if(notEmpty(checkin, "Masukkan tanggal check-in")){
		if(isDate(checkin, "Format tanggal yyyy-mm-dd")) {
			if(notEmpty(checkout, "Masukkan tanggal check-out")){
				if(isDate(checkout, "Format tanggal yyyy-mm-dd")) {
					return true;
				}
			}
		}
	}
	return false;
}

function notEmpty(elem, helperMsg){
	if(elem.value.length == 0){
		alert(helperMsg);
		elem.focus(); // set the focus to this input
		return false;
	}
	return true;
}

function isDate(elem, helperMsg){
	var dateExp =/^[0-9]{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])+$/;
	if(elem.value.match(dateExp)){
		return true;
	}else{
		alert(helperMsg);
		elem.focus();
		return false;
	}
}

</script>
</head>
<body id="page1" onload="new ElementMaxHeight();">
<div id="main">
<!-- header -->
	<div id="header">
		<div class="row-1">
			<div class="wrapper">
				<div class="logo">
					<h1><a href="index.html">Indonesian Hotels</a></h1>
					<em>Hotel</em>
					<strong>True Luxury</strong>
				</div>
				
			</div>
		</div>
		<div class="row-2">
	 		<div class="indent">
<!-- header-box begin -->
				<div class="header-box">
					<div class="inner">
						<ul class="nav">
					 		<li><a href="index.php">Home page</a></li>
							<li><a href="#" class="current">Room and Rates</a>
							<ul>
								<li><a href="indo1.php" target="_self">Indonesian Hotels 1</a></li>
								<li><a href="indo2.php" target="_self">Indonesian Hotels 2</a></li>
								<li><a href="indo3.php" target="_self">Indonesian Hotels 3</a></li>
								<li><a href="indo4.php" target="_self">Indonesian Hotels 4</a></li>
								<li><a href="indo5.php" target="_self">Indonesian Hotels 5</a></li>
								<li><a href="indo6.php" target="_self">Indonesian Hotels 6</a></li>
								<li><a href="indo7.php" target="_self">Indonesian Hotels 7</a></li>
							</ul>
							
							</li>
							<li><a href="booking.php">Booking</a>
							<ul>
								<li><a href="bookindo1.php" target="_self">Indonesian Hotels 1</a></li>
								<li><a href="bookindo2.php" target="_self">Indonesian Hotels 2</a></li>
								<li><a href="bookindo3.php" target="_self">Indonesian Hotels 3</a></li>
								<li><a href="bookindo4.php" target="_self">Indonesian Hotels 4</a></li>
								<li><a href="bookindo5.php" target="_self">Indonesian Hotels 5</a></li>
								<li><a href="bookindo6.php" target="_self">Indonesian Hotels 6</a></li>
								<li><a href="bookindo7.php" target="_self">Indonesian Hotels 7</a></li>
							</ul>

							</li>
							<li><a href="location.php">Location</a></li>
							<li><a href="gallery.php">Gallery</a></li>
							<li><a href="contact.php">Contact Us</a></li>
						</ul>
					</div>
				</div>
<!-- header-box end -->
			</div>
		</div>
	</div><div class="ic">Lovely Flash templates from TemplateMonster!</div>
<!-- content -->
	<div id="content">
		<div class="wrapper">
			<div class="aside maxheight">
<!-- box begin -->
				<div class="box maxheight">
					<div class="inner">
						<?php
						//include_once("form_reservasi.php");
						?>
					</div>
				</div>
<!-- box end -->
			</div>
			<div id="content">
				<div class="indent">
					<h2>Indonesian Hotels 1</h2>
					<h3>Pesanan</h3>
					
					<?php
					
					$qty0 = $_POST['qty_room_0'];
					$qty1 = $_POST['qty_room_1'];
					$qty2 = $_POST['qty_room_2'];
					$qty3 = $_POST['qty_room_3'];
					$qty4 = $_POST['qty_room_4'];
					$qty5 = $_POST['qty_room_5'];
					$qty6 = $_POST['qty_room_6'];
					$qty7 = $_POST['qty_room_7'];
					$qty8 = $_POST['qty_room_8'];
	
					$id0 = $_POST['id_jenis_0'];
					$id1 = $_POST['id_jenis_1'];
					$id2 = $_POST['id_jenis_2'];
					$id3 = $_POST['id_jenis_3'];
					$id4 = $_POST['id_jenis_4'];
					$id5 = $_POST['id_jenis_5'];
					$id6 = $_POST['id_jenis_6'];
					$id7 = $_POST['id_jenis_7'];
					$id8 = $_POST['id_jenis_8'];
					
					$kat0 = $_POST['jenis_0'];
					$kat1 = $_POST['jenis_1'];
					$kat2 = $_POST['jenis_2'];
					$kat3 = $_POST['jenis_3'];					
					$kat4 = $_POST['jenis_4'];					
					$kat5 = $_POST['jenis_5'];
					$kat6 = $_POST['jenis_6'];
					$kat7 = $_POST['jenis_7'];					
					$kat8 = $_POST['jenis_8'];					
					
					$harga_bayar = 0;
					
					if($qty0!="" AND $qty0!=0){
						$harga = (100000 * $qty0);
						echo $kat0 . " : Rp100.000 x $qty0 : " . $harga . '<br>';
						$harga_bayar = $harga_bayar + $harga;
					}
					if($qty1!="" AND $qty1!=0){
						$harga = (100000 * $qty1);
						echo $id1.$kat1 . " : Rp100.000 x $qty1 : "  . $harga . '<br>';
						$harga_bayar = $harga_bayar + $harga;
					}
					if($qty2!="" AND $qty2!=0){
						$harga = (150000 * $qty2);
						echo $id2.$kat2 . " : Rp150.000 x $qty2 : " . $harga . '<br>';
						$harga_bayar = $harga_bayar + $harga;
					}
					if($qty3!="" AND $qty3!=0){
						$harga = (200000 * $qty3);
						echo $kat3 . " : Rp200.000 x $qty3 : "  . $harga . '<br>';
						$harga_bayar = $harga_bayar + $harga;
					}
					if($qty4!="" AND $qty4!=0){
						$harga = (200000 * $qty4);
						echo $kat4 . " : Rp200.000 x $qty4 : "  . $harga . '<br>';
						$harga_bayar = $harga_bayar + $harga;
					}
					if($qty5!="" AND $qty5!=0){
						$harga = (200000 * $qty5);
						echo $kat5 . " : Rp200.000 x $qty5 : "  . $harga . '<br>';
						$harga_bayar = $harga_bayar + $harga;
					}
					if($qty6!="" AND $qty6!=0){
						$harga = (200000 * $qty6);
						echo $kat6 . " : Rp200.000 x $qty6 : "  . $harga . '<br>';
						$harga_bayar = $harga_bayar + $harga;
					}
					if($qty7!="" AND $qty7!=0){
						$harga = (200000 * $qty7);
						echo $kat7 . " : Rp200.000 x $qty7 : "  . $harga . '<br>';
						$harga_bayar = $harga_bayar + $harga;
					}
					
					echo 'Total Bayar : ' . $harga_bayar . '<br>';
					?>
						<table>
						<tr><td></td></tr>
						<tr><td><input type="submit" name="checkout" value="Checkout" /></td></tr>
						</table>
					</form>
				</div>
			</div>

		</div>
	</div>
	
<!-- footer -->
	<div id="footer">
  		<ul class="nav">
	 		<li><a href="index.html">Home</a>|</li>
			<li><a href="services.html">Services</a>|</li>
			<li><a href="gallery.html">Gallery</a>|</li>
			<li><a href="restaurant.html">Restaurant</a>|</li>
			<li><a href="testimonials.html">Testimonials</a>|</li>
			<li><a href="booking.html">Booking</a></li>
		</ul>
		<div class="wrapper">
			<div class="fleft">Copyright (c) 2012 Indonesian Hotels</div>
		</div>
	</div>
</div>
</body>
</html>